package com.ant.myagile.backlog
import com.ant.myagile.Project

class UserStory implements Comparable<UserStory> {
	
	String name
	String description
	int value
	String status
	
	static hasMany = [issues : Issue]
	static belongsTo = [project : Project]
	
    static constraints = {
		description(nullable:false, blank: false, maxSize: 65535)
		value(nullable:false,min:0)
		status(nullable:true)
    }
	def String toString(){
		return description
	}
	
	@Override
	public int compareTo(UserStory o) {
		return this.id.compareTo(o.id);
	}
}
